# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-pysendfile
_pkgname=pysendfile
pkgver=2.0.1
pkgrel=3
pkgdesc='A Python interface to sendfile(2).'
url='https://pypi.org/project/pysendfile/#files'
arch=('x86_64' 'aarch64')
license=('MIT')
depends=('python2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('d6ee08eb251fac30c90a9ee829fd992f3620697eef2893ced5a2c6273486c3c5fd35c70962585a8d747d578817391f91c929bfeeba8c4485d52a15748229ca9c')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

